<!--
 * Description: FD 基本信息
 * Company: 联宝（合肥）电子科技有限公司
 * Author: Qiuxue.Wu
 * Date: 2020/06/10 16:00
-->

<template>
  <div>
    <!--数据表单-->
    <el-form
      label-position="left"
      label-width="140px"
      :model="inputData"
      size="mini"
      style="margin-top: 10px"
    >
      <!-- ---------------FD基本信息START------------------ -->
      <el-row>
        <el-col :span="24">
          <el-form-item
            :label="$t('FD.fdBaseInfo')"
            label-width="160px"
            style="background: #c9d2ca;padding-left:20px"
          />
        </el-col>
      </el-row>
      <el-row style="padding-left:20px">
        <!--FD编号-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.fdId')">
            <span>{{ inputData.fdId }}</span>
          </el-form-item>
        </el-col>

        <!--FD版本-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.version')">
            <span>{{ inputData.version }}</span>
          </el-form-item>
        </el-col>

        <!-- FD报价期限 -->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.expiresDay')">
            <span>{{ inputData.expiresDay }}</span>
          </el-form-item>
        </el-col>

        <!--bu类型-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.bu')">
            <span>{{ inputData.bu }}</span>
          </el-form-item>
        </el-col>

        <!--FD名称-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.fdName')">
            <span>{{ inputData.fdName }}</span>
          </el-form-item>
        </el-col>

        <!--平台-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.platform')">
            <span>{{ inputData.platform }}</span>
          </el-form-item>
        </el-col>

        <!--尺寸-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.lcd')">
            <span>{{ inputData.lcd }}</span>
          </el-form-item>
        </el-col>

        <!--产量-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.volume')">
            <span>{{ inputData.volume }}</span>
          </el-form-item>
        </el-col>

        <!--推向市场时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.ss')">
            <span>{{ inputData.ss }}</span>
          </el-form-item>
        </el-col>

        <!--创建人-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.createUser')">
            <span>
              {{
                $store.getters['user/getUserNameById'](inputData.createUser) || $t('result.none')
              }}
            </span>
          </el-form-item>
        </el-col>

        <!--创建人岗位-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.createPost')">
            <span>{{ $store.getters['post/getPostNameById'](inputData.createPost) }}</span>
          </el-form-item>
        </el-col>

        <!--创建时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.createTime')">
            <span>{{ inputData.createTime }}</span>
          </el-form-item>
        </el-col>

        <!--修改人-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.modifyUser')">
            <span>{{ $store.getters['user/getUserNameById'](inputData.modifyUser) }}</span>
          </el-form-item>
        </el-col>

        <!--修改人岗位-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.modifyPost')">
            <span>{{ $store.getters['post/getPostNameById'](inputData.modifyPost) }}</span>
          </el-form-item>
        </el-col>

        <!--修改时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.modifyTime')">
            <span>{{ inputData.modifyTime }}</span>
          </el-form-item>
        </el-col>

        <!--指派备注-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.remark')">
            <span>{{ inputData.remark }}</span>
          </el-form-item>
        </el-col>
        <!-- tempModelNumber -->
        <el-col :span="6">
          <el-form-item label="TempModel Number">
            <span>{{ inputData.tempModelNumber }}</span>
          </el-form-item>
        </el-col>
        <!-- N-1专案 -->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.baseProjectId')">
            <span>{{ inputData.baseProjectId }}</span>
          </el-form-item>
        </el-col>
        <!-- N-1机型 -->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.baseModel')">
            <span>{{ inputData.baseModel }}</span>
          </el-form-item>
        </el-col>
        <!-- N-1配置 -->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.baseConfig')">
            <span>{{ inputData.baseConfig }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <!-- ----------------FD基本信息END------------------- -->

      <!-- -----------------FD负责人START------------------ -->
      <el-row>
        <el-col :span="24">
          <el-form-item
            :label="$t('FD.fdOwner')"
            label-width="160px"
            style="background: #c9d2ca;padding-left:20px"
          />
        </el-col>
      </el-row>
      <el-row style="padding-left:20px">
        <!--PBM负责人-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.pbmOwner')">
            <span>
              {{ $store.getters['user/getUserNameById'](inputData.pbmOwner) || $t('result.none') }}
            </span>
          </el-form-item>
        </el-col>

        <!-- EE负责人 -->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.eeOwner')">
            <span>
              {{ $store.getters['user/getUserNameById'](inputData.eeOwner) || $t('result.none') }}
            </span>
          </el-form-item>
        </el-col>

        <!--ME负责人-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.meOwner')">
            <span>
              {{ $store.getters['user/getUserNameById'](inputData.meOwner) || $t('result.none') }}
            </span>
          </el-form-item>
        </el-col>

        <!--PKG负责人-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.pkgOwner')">
            <span>
              {{ $store.getters['user/getUserNameById'](inputData.pkgOwner) || $t('result.none') }}
            </span>
          </el-form-item>
        </el-col>
      </el-row>
      <!-- -----------------FD负责人END-------------------- -->

      <!-- -----------------FD审批状态及时间START------------ -->
      <el-row>
        <el-col :span="24">
          <el-form-item
            :label="$t('FD.fdApproveState')"
            label-width="160px"
            style="background: #c9d2ca;padding-left:20px"
          />
        </el-col>
      </el-row>

      <el-row style="padding-left:20px">
        <!--EE估价分配状态-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.eeAssigned')">
            <span>{{ $store.getters['dict/dictValue'](inputData.eeAssigned) }}</span>
          </el-form-item>
        </el-col>

        <!--EE分配时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.eeAssignedTime')">
            <span>{{ inputData.eeAssignedTime }}</span>
          </el-form-item>
        </el-col>

        <!--EE审批状态-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.eeApproved')">
            <span>{{ $store.getters['dict/dictValue'](inputData.eeApproved) }}</span>
          </el-form-item>
        </el-col>

        <!--EE审批时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.eeApprovedTime')">
            <span>{{ inputData.eeApprovedTime }}</span>
          </el-form-item>
        </el-col>

        <!--ME估价分配状态-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.meAssigned')">
            <span>{{ $store.getters['dict/dictValue'](inputData.meAssigned) }}</span>
          </el-form-item>
        </el-col>

        <!--ME分配时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.meAssignedTime')">
            <span>{{ inputData.meAssignedTime }}</span>
          </el-form-item>
        </el-col>

        <!--ME审批状态-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.meApproved')">
            <span>{{ $store.getters['dict/dictValue'](inputData.meApproved) }}</span>
          </el-form-item>
        </el-col>

        <!--ME审批时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.meApprovedTime')">
            <span>{{ inputData.meApprovedTime }}</span>
          </el-form-item>
        </el-col>

        <!--PKG估价分配状态-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.pkgAssigned')">
            <span>{{ $store.getters['dict/dictValue'](inputData.pkgAssigned) }}</span>
          </el-form-item>
        </el-col>

        <!--PKG分配时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.pkgAssignedTime')">
            <span>{{ inputData.pkgAssignedTime }}</span>
          </el-form-item>
        </el-col>

        <!--PKG审批状态-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.pkgApproved')">
            <span>{{ $store.getters['dict/dictValue'](inputData.pkgApproved) }}</span>
          </el-form-item>
        </el-col>

        <!--PKG审批时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.pkgApprovedTime')">
            <span>{{ inputData.pkgApprovedTime }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <!-- -----------------FD审批状态及时间END--------------- -->

      <!-- -----------------FD是否状态及时间START------------- -->
      <el-row>
        <el-col :span="24">
          <el-form-item
            :label="$t('FD.fdTrueOrFalseState')"
            label-width="160px"
            style="background: #c9d2ca;padding-left:20px"
          />
        </el-col>
      </el-row>

      <el-row style="padding-left:20px">
        <!-- fdStatus -->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.fdStatus')">
            <span>{{ $fdStatus({ code: inputData.fdStatus }) }}</span>
          </el-form-item>
        </el-col>

        <!--接收时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.receivedTime')">
            <span>{{ inputData.receivedTime }}</span>
          </el-form-item>
        </el-col>

        <!--分配时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.assignedTime')">
            <span>{{ inputData.assignedTime }}</span>
          </el-form-item>
        </el-col>

        <!--驳回时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.rejectedTime')">
            <span>{{ inputData.rejectedTime }}</span>
          </el-form-item>
        </el-col>

        <!--完成时间-->
        <el-col :span="6">
          <el-form-item :label="$t('FdData.completeTime')">
            <span>{{ inputData.completeTime }}</span>
          </el-form-item>
        </el-col>
      </el-row>
      <!-- -----------------FD是否状态及时间END---------------- -->
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'FdDataBaseView',
  props: {
    inputData: {
      type: Object,
      default: () => {}
    }
  }
}
</script>

<style scoped>
.el-form-item__content span {
  margin-left: 5px;
  color: blue;
}
</style>
